<script>
  export default {
    name: 's-add',
    props:{
      dynamicPage:{
        type:Number,
        default: 1,
      }
    },
    methods: {
      clickAdd() {
        this.$emit('clickAdd');
      },
      getPosition() {
        console.log('查询到的添加标签');
        const query = uni.createSelectorQuery().in(this);
        query.select(`.append`).boundingClientRect(async res => {
          console.log(res);
          uni.$emit(`setCoordinate${this.dynamicPage}`, { res });
        }).exec();
      },
    },
  };
</script>

<template>
  <view class="append label flex align-center justify-center" @click.stop="clickAdd">
    <view class="text">
      点击添加
    </view>
  </view>
</template>

<style scoped lang="scss">
  .label {
    width: 117rpx;
    height: 220rpx;
    background: #6EA0FC;
    border-radius: 15rpx 15rpx 15rpx 15rpx;

    .text {
      width: 60rpx;
      height: 42rpx;
      font-family: PingFang SC, PingFang SC;
      font-weight: 500;
      font-size: 30rpx;
      color: #FFFFFF;
    }
  }

  .first {
    right: 0;
  }

  .last {
    left: 0;
  }

  .top {
    position: absolute;
    height: 2rpx;
    background: #707070;
  }
</style>